#ifndef CAMERA_H
#define CAMERA_H

#include <NxVec3.h>
#include <NxQuat.h>
#include <NxBox.h>
#include <NxPlane.h>

class Camera {
private:
	NxVec3 position;
	NxVec3 direction;
	NxVec3 upNormal;

	float fovyAngle;
	float aspectRatio;
	float zNear;
	float zFar;
	
public:
	Camera();
	Camera(const NxVec3& position, const NxVec3& direction, float aspectRatio);
	Camera(const NxVec3& position, const NxVec3& direction, float aspectRatio, float fovyAngle, float zNear, float zFar);
	virtual ~Camera();

	void SetPosition(const NxVec3& pos);
	void SetDirection(const NxVec3& direction);
	inline void SetUpNormal(const NxVec3& upNormal) { this->upNormal = upNormal; }

	void SetFovyAngle(float fovyAngle);
	void SetAspectRatio(float aspectRatio);
	void SetzNear(float zNear);
	void SetzFar(float zFar);

	const NxVec3& GetPosition() const;
	const NxVec3& GetDirection() const;
	NxVec3 GetSideNormal() const;
	inline const NxVec3& GetUpNormal() const { return upNormal; }
	float GetFovyAngle() const;
	float GetAspectRatio() const;
	float GetzNear() const;
	float GetzFar() const;

	float GetXAngle() const;
	float GetYAngle() const;
	float GetZAngle() const;

    NxPlane *GetPlanesOfView() const;

	void MoveBy(const NxVec3& d);
	void Rotate(float xAngle, float yAngle);
};

#endif //CAMERA_H